package com.murong.ai.chat;


import com.murong.ai.chat.component.ListenToEnglishComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;


@SpringBootApplication
public class ChatbotApplication implements CommandLineRunner {

	@Autowired
	private ListenToEnglishComponent component;

	@Value("${porcupine.keyword.file.path}")
	private String keywordFilePath;

	@Value("${porcupine.access.key}")
	private String accessKey;


	public static void main(String[] args) {
		SpringApplication.run(ChatbotApplication.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		component.startListening();
		//component.startTest();
	}
}